﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="promotion.aspx.cs" Inherits="promotion" Title="霓艺儿童摄影-优惠活动" %>
<%@ Register assembly="AspNetPager" namespace="Wuqi.Webdiyer" tagprefix="webdiyer" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <link href="css/promotion.css" rel="stylesheet" type="text/css"  />
    <script language="javascript" type="text/javascript" src="js/jquery-ui-1.8.22.custom.min.js"></script>
    <script language="javascript" type="text/javascript" src="js/promotion.js"></script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <div class="head">
        <div class="nav">
            <div class="msg-box">
                <span class="date"></span>
                
                <!-- 有4种状态，按照优先级如下：1.有x项活动即将过期（剩余天数小于等于3天） 2.有x项活动正在进行 3. 有x项活动即将开始 4. 目前没有活动，敬请关注 -->
                <span class="msg" runat="server" id="spanstatusmsg"></span>
                
                <span class="arrow"></span>
            </div>
        </div>
        
        <div class="tag">
            <span class="text">优惠活动</span><br />
            <span class="eng">- PROMOTION -</span>
        </div>
    </div>

    <!-- 每页最多10条 按照 正在进行，即将开始，已经过期 排序 -->
    <div id="promotion_list">
        <asp:GridView ID="GridView1" CssClass="promotion-list" runat="server" ShowHeader="false" AutoGenerateColumns="False" PageSize="5" AllowPaging="true">
            <Columns>
                <asp:TemplateField>
                    <ItemTemplate>
                        <div class="promotion" postPath = '<%# "pictures/promotion/" + Eval("PictureBName")%>' runat="server">
                            <div class="banner">
                                <img runat="server" src='<%# "pictures/promotion/" + Eval("PictureAName")%>' />
                                <span class="btn-view">查看详情</span>
                                <ul class="btn-holder">
                                    <li class="btn-qq2" runat="server" visible='<%# (string)Eval("PromotionStatus")=="inprocess" %>'><a href="http://wpa.qq.com/msgrd?v=3&uin=583391356&site=qq&menu=yes" target="_blank"></a></li>
                                    <li class="btn-qq1" runat="server" visible='<%# (string)Eval("PromotionStatus")=="inprocess" %>'><a href="http://wpa.qq.com/msgrd?v=3&uin=245667956&site=qq&menu=yes" target="_blank"></a></li>
                                    <li class="btn-soon-coming" runat="server" visible='<%# (string)Eval("PromotionStatus")=="notstart" %>'><a></a></li>
                                    <li class="btn-over-due" runat="server" visible='<%# (string)Eval("PromotionStatus")=="overdue" %>'><a></a></li>
                                </ul>
                            </div>
                            <div class="info">
                                <span class="title"><%# Eval("PromotionTitle")%></span>
                                <ul class="others">
                                    <li class="date"><%# ((DateTime)Eval("StartDay")).ToString("yyyy-MM-dd")%> - <%# ((DateTime)Eval("DueDay")).AddDays(-1).ToString("yyyy-MM-dd") %></li>
                                    <li class="due" runat="server" visible='<%# (string)Eval("PromotionStatus")=="inprocess" %>'>剩余<span class="num"><%# Eval("RemainingDays") %></span>天</li>
                                    <!--<li class="read">已阅<span class="num">102</span>次</li>-->
                                </ul>
                                
                            </div>
                        </div>
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
            <PagerTemplate>
                <div class="pagination">
                    <webdiyer:AspNetPager ID="AspNetPager1" runat="server" NumericButtonCount="5"  ShowBoxThreshold="5" ShowPageIndexBox="Never"
                        CurrentPageButtonClass="sel" onpagechanging="AspNetPager1_PageChanging" PrevPageText="上一页" NextPageText="下一页"
                        PageSize="5" CenterCurrentPageButton="True" FirstPageText="首页" LastPageText="末页">
                </webdiyer:AspNetPager></div>
            </PagerTemplate>
        </asp:GridView>
    </div>
</asp:Content>

